package com.tbs.easyhomemoneyserver.dao

import com.tbs.easyhomemoneyserver.DO.UserRightParamEntity
import org.apache.ibatis.annotations.Mapper
import org.apache.ibatis.annotations.Select
import tk.mybatis.mapper.common.BaseMapper

@Mapper
interface UserRightParamMapper : BaseMapper<UserRightParamEntity> {
    @Select(
        "SELECT urp.* FROM user_rights ur JOIN user_right_param urp ON urp.user_right_id = ur.id WHERE ur.user_id = #{userId}"
    )
    fun findByUserId(userId: Long): List<UserRightParamEntity>
}
